package com.lxw.study.creational.prototype;

import com.alibaba.fastjson.JSON;
import lombok.Data;

@Data
public class Product implements ProductPrototype {
    private String category;
    private String seller;
    private String brand;
    private String name;
    private double price;
    private String description;

    public Product(String category, String seller, String brand) {
        this.category = category;
        this.seller = seller;
        this.brand = brand;
    }

    @Override
    public Product copy() {
        return new Product(this.category, this.seller, this.brand);
    }


    public void showDetails() {
        System.out.println(JSON.toJSONString(this));
    }
}